package com.thomas.jvm;

/**   
* @Description: VM Args: -Xss128k
* @author thomas_liu  
* @date 2018年6月13日 上午9:46:28 
* @version V1.0   
*/
public class JavaVMStackSOF {
	
	private int stackLength = 1;
	
	
	public void stackLeak(){
		stackLength++;
		stackLeak();
	}
	
	public static void main(String[] args) throws Throwable {
		JavaVMStackSOF oom = new JavaVMStackSOF();
		try {
			oom.stackLeak();
		} catch (Throwable e) {
			System.out.println("stack length: "+oom.stackLength);
			throw e;
		}
	}

}
